#ifndef LOGVIEWER_H
#define LOGVIEWER_H
#include "main.h"
using namespace Gtk;
using namespace Glib;
using namespace std;

class logViewer : public TextView
{
    public:
        Dispatcher update;
        Mutex mutex;
        RefPtr<TextMark> endMark;
        /** Default constructor */
        logViewer();
        /** Default destructor */
        virtual ~logViewer();
        void newLine();
        void logGreen(ustring msg, bool bold=false);
        void logRed  (ustring msg, bool bold=false);
        void log     (ustring msg, bool bold=false);
        void beforeDraw();
    logViewer& operator<<(const char msg[]);
    logViewer& operator<<(ustring& msg);
    protected:
        RefPtr<TextBuffer> logBuffer;
        vector<pair<string, string> > tempBuffer;
    private:
};


#endif // LOGVIEWER_H
